package com.rd.student.jiaji.class3.qinjialin.Question;

import java.util.Scanner;

public class question1 {
    public static void main(String[] args) {
        Scanner num = new Scanner(System.in);

        System.out.println("请输入一个层数；");
        int k = num.nextInt();
        for (int i = 0; i < k; i++) {
            for (int j = 1; j < k - i; j++) {
                System.out.print(" ");
            }
            for (int b = 0; b < 2 * i + 1; b++) {
                System.out.print("*");
            }

            System.out.println();
        }
        System.out.println("请输入一个层数；");


//

    }
}


